// import { resolve, reject } from "core-js/fn/promise";
import axios from "./index";
export let get = (url, params) => {
    return new Promise((resolve, reject) => {
        return axios.get(url, { params: params }).then(res => {
            return resolve(res)
        }).catch(err => {
            return reject(err)
        })
    })
}


export let post = (url, data) => {
    return new Promise((resolve, reject) => {
        return axios.post(url, data).then(res => {
            return resolve(res)
        }).catch(err => {
            return reject(err)
        })
    })
}

export let put = (url, data) => {
    return new Promise((resolve, reject) => {
        return axios.put(url, data).then(res => {
            return resolve(res)
        }).catch(err => {
            return reject(err)
        })
    })
}

export let deletes = (url, data) => {
    return new Promise((resolve, reject) => {
        return axios.delete(url, data).then(res => {
            return resolve(res)
        }).catch(err => {
            return reject(err)
        })
    })
}